import 'package:flutter/cupertino.dart';
import 'package:flutter_learn/learn/inherit/Config.dart';
import 'package:flutter_learn/learn/inherit/ConfigWidget.dart';

class ConfiguredText extends StatelessWidget {
  const ConfiguredText({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    print("重新构建＝＝＝＞ConfiguredText");
    Config config = ConfigWidget.of(context);
    return Text(
      'Font size:${config.fontSize}',
      style: TextStyle(color: config.color, fontSize: config.fontSize),
    );
  }
}
